package com.java.business.controller;

import com.java.business.model.MaintainDetail;
import com.java.business.model.MaintainRecord;
import com.java.business.service.MaintainDetailService;
import com.java.business.service.MaintainRecordService;
import com.java.common.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 维修保养明细
 */
@RestController
@RequestMapping("/maintainDetail")
public class MaintainDetailController {

    @Autowired
    private MaintainDetailService maintainDetailService;

    @PostMapping("/list")
    public Result list(@RequestBody MaintainDetail maintainDetail) {
        return maintainDetailService.list(maintainDetail);
    }

    @GetMapping("/lists")
    public Result lists(Integer id) {
        return maintainDetailService.lists(id);
    }

    @PostMapping("/save")
    public Result save(@RequestBody MaintainDetail maintainDetail) {
        return maintainDetailService.save(maintainDetail);
    }

    @PostMapping("/modify")
    public Result modify(@RequestBody MaintainDetail maintainDetail) {
        return maintainDetailService.modify(maintainDetail);
    }

    @PostMapping("/get")
    public Result get(int id) {
        return maintainDetailService.get(id);
    }

    @GetMapping("/remove")
    public Result remove(int[] ids) {
        return maintainDetailService.remove(ids);
    }

}
